home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr52
/
syscheck.zip
/
SYSCHECK.DOC
next >
Wrap
Text File
|
1993-05-13
|
2KB
|
64 lines
Syntax : SYSCHECK <handles> <memory> [<userid> [<errorfile>]
where: <handles> - Number of file handles required (256 max).
<memory> - Memory required (640k max).
<userid> - Optional - user ID to report to screen and
error file (max length = 20 characters).
<errorfile> - Optional - path/name of error text file
(max length = 50 characters).
SYSCHECK returns the following DOS ERRORLEVEL codes:
0 File handles and memory are sufficient
1 Not enough available file handles
2 Not enough available memory
3 Invalid parameters passed to SYSCHECK
As optional features, a user's ID or name can be reported to an
error text file.
*************************************************************************
Example (Using SYSCHECK in a batch file before calling a CLIPPER program)
@echo off
cls
rem Check file handles and memory, report USERID to the file ERROR.TXT
rem NOTE: The %variable% syntax used in a batch file is the means
rem of reading an external DOS environment variable.
syscheck 55 505 %userid% error.txt
rem Branch according to the ERRORLEVEL return code from SYSCHECK
if errorlevel==0 goto okay
if errorlevel==1 goto handles
if errorlevel==2 goto memory
if errorlevel==3 goto oops
:okay
rem Run your CLIPPER program
yourprog.exe
goto end
:handles
echo Insufficient available file handles to run YOURPROG
echo (additional instructions here!)
pause
goto end
:memory
echo Insufficient memory to run YOURPROG
echo (additional instructions here!)
pause
goto end
:oops
echo Invalid SYSCHECK parameters
echo (additional instructions here!)
pause
:end
*************************************************************************
}